package com.xiejr.api.dto.order;

import com.xiejr.model.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("订单商品关联表 数据传输对象")
public class OrderItemsDTO extends BaseEntity.BaseDTO {
    private static final long serialVersionUID = -54296124629188953L;
    /**
     * 主键id
     */
    @ApiModelProperty(value = "主键id")
    @NotEmpty(message = "主键id不得为空")
    private String id;


    /**
     * 归属订单id
     */
    @ApiModelProperty(value = "归属订单id")
    @NotEmpty(message = "归属订单id不得为空")
    private String orderId;


    /**
     * 商品id
     */
    @ApiModelProperty(value = "商品id")
    @NotEmpty(message = "商品id不得为空")
    private String itemId;


    /**
     * 商品图片
     */
    @ApiModelProperty(value = "商品图片")
    @NotEmpty(message = "商品图片不得为空")
    private String itemImg;


    /**
     * 商品名称
     */
    @ApiModelProperty(value = "商品名称")
    @NotEmpty(message = "商品名称不得为空")
    private String itemName;


    /**
     * 规格id
     */
    @ApiModelProperty(value = "规格id")
    @NotEmpty(message = "规格id不得为空")
    private String itemSpecId;


    /**
     * 规格名称
     */
    @ApiModelProperty(value = "规格名称")
    @NotEmpty(message = "规格名称不得为空")
    private String itemSpecName;


    /**
     * 成交价格
     */
    @ApiModelProperty(value = "成交价格")
    @NotNull(message = "成交价格不得为空")
    private Double price;


    /**
     * 购买数量
     */
    @ApiModelProperty(value = "购买数量")
    @NotNull(message = "购买数量不得为空")
    private Integer buyCounts;


    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @NotNull(message = "创建时间不得为空")
    private Date createdTime;


    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @NotNull(message = "更新时间不得为空")
    private Date updatedTime;


}